/*
 * @Author: yixin 
 * @Date: 2019-12-06 11:08:20 
 * @Last Modified by: yixin
 * @Last Modified time: 2019-12-06 11:08:40
 * 公用头部
 */
import React, { Component } from "react"
import styles from './header.less'
import PropTypes from 'prop-types'
import { withRouter } from "react-router"

class Header extends Component {

  static propTypes = {
    children: PropTypes.any,
  }

  render(){
    return (
      <div className={styles.header}>
        <div onClick={()=>{ this.props.history.goBack() }} className={styles.back}>
          <img src={require('../assets/img/back.png')} />
        </div>
        {this.props.children}
      </div>
    )
  }
}

export default withRouter(Header)